
// __deprecated : all there feature should given by each render, not whole !! 
typedef enum {
	HINT_RENDER		= 0x01,		// hint the application with linear texture sample !
	HINT_WIRED		= 0x02,		// hint the application with debug mode 
	HINT_CULLNONE	= 0x04,		// hint the application with cull mode 
} GP_HINT;

// ----------------------------- 

typedef enum {
    TYPE_INVALID	= 0x00,     
    TYPE_COLOR,					// XRGB
    TYPE_COLORALPHA,			// ARGB
	TYPE_RCOLOR,				// XBGR
	TYPE_RCOLORALPHA,			// ABGR
    TYPE_DEPTH,					// D
    TYPE_DEPTHMASK,				// D + S
	TYPE_LUMIN,					// UVWX
	TYPE_LUMINFULL,				// UVWQ(L)
} GP_TYPE;

typedef enum {
    PREC_IN_INVALID	= 0x00, 
	PREC_IN_08,					// R3G3B2 / L8
    PREC_IN_16,					// R5G6B5 / D15S1 / D16 / L6V5U5
	PREC_IN_16_08,				// A8L8 / V8U8(YUV-420)
    PREC_IN_32,					// A8R8G8B8 / X8R8G8B8 / D24S8 / D32 / Q8W8V8U8 / X8L8V8U8(YUV-444)
	PREC_IN_32_10,				// A2B10G10R10 / A2W10V10U10
	PREC_IN_32_16,				// G16R16 / V16U16(YUV-422)
} GP_INPUTPREC;

typedef enum {
    OPMODE_INVALID = 0x00,		// 
    OPMODE_READ,				// texture can made as source 
    OPMODE_WRITE,				// texture can made as target
} GP_OPMODE;

typedef enum {
    PROGRAM_INVALID= 0x00,		// 
    PROGRAM_VERTEX,				// vertex shader 
    PROGRAM_PIXEL,				// pixel shader (fragment)
} GP_PROGRAM;

typedef struct {
    float x, y;
} GP_POINT;

typedef struct {
    GP_POINT pt1;    // left-top
    GP_POINT pt2;    // right-bottom
} GP_RECT;

typedef struct {
    GP_TYPE         colortype;
    GP_INPUTPREC    colorprecision;
    GP_TYPE         depthtype;
    GP_INPUTPREC    depthprecision;
    long            width, height;    // for screen width and height
    void*           canvas;           // hwnd for WINDOWS, or NULL for pure calculation 
} GP_CONTEXT;

typedef struct {
    int depth_clear /*: 1*/;
    int color_clear /*: 1*/;
    int mask_clear  /*: 1*/;
} GP_PREPAREMASK;

typedef struct {
    GP_PREPAREMASK flagmask;

    unsigned long value_color;    // ARGB
    float value_depth;            // 0.0 -> 1.0
    unsigned long value_mask;     // 0 or 1 ... 
} GP_PREPARE;

typedef struct {
    int red_write     /*: 1*/;        // default is no write
    int green_write   /*: 1*/;        // default is no write
    int blue_write    /*: 1*/;        // default is no write 
    int alpha_write   /*: 1*/;        // default is no write
    int alpha_test    /*: 1*/;        // default is no test

    int depth_test    /*: 1*/;        // default is no test
    int depth_write   /*: 1*/;        // default is no write
    int mask_test     /*: 1*/;        // default is no test
} GP_CALCSTATE;

// explain : alpha_test ==  1 use great than can-pass testmode, while == -1 means less than can-pass testmode, but 1 is more useful (ref is 0x00)
//           depth_test == -1 use great than can-pass testmode, while ==  1 means less than can-pass testmode, but 1 is more useful (ref is 1.0f)
